<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>CSS Test: table-caption width given zero-width table</title>
        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
        <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#"/>
        <meta name="flags" content="" />
        <meta name="assert" content="Table caption is the width of the table's border box." />
        <style type="text/css">
            html { background: white; color: black; }
            .caption
            {
                display: table-caption;
                background: red;
                border: solid lime 6px;
                text-align: center;
                width: 100px;
            }
            .table
            {
                background: blue;
                display: table;
                border: solid blue 6px;
            }
            .zero {
                width: 0;
            }
            .fixed {
                table-layout: fixed; width: 0;
            }
            .row
            {
                display: table-row;
            }
            .cell
            {
                display: table-cell;
            }
            .container {
              border: dotted silver;
              position: relative;
              height: 7em;
            }
            p {
              clear: both;
            }
        </style>
    </head>
    <body>
        <p>[auto layout auto width] There should be a green box below the same width as the
           blue box and no red.</p>
        <div class="container">
          <div class="table">
              <div class="caption">
                  <div>This is the table caption.</div>
              </div>
              <div class="row">
                  <div class="cell"></div>
              </div>
          </div>
        </div>
        <p>[fixed layout auto width] There should be a green box below the same width as the
           blue box and no red.</p>
        <div class="container">
          <div class="table">
              <div class="caption">
                  <div>This is the table caption.</div>
              </div>
              <div class="row">
                  <div class="cell"></div>
              </div>
          </div>
        </div>
        <p>[auto layout zero width] There should be a green box below the same width as the
           blue box and no red.</p>
        <div class="container">
          <div class="table">
              <div class="caption">
                  <div>This is the table caption.</div>
              </div>
              <div class="row">
                  <div class="cell"></div>
              </div>
          </div>
        </div>
        <p>[fixed layout zero width] There should be a green box below the same width as the
           blue box and no red.</p>
        <div class="container">
          <div class="table">
              <div class="caption">
                  <div>This is the table caption.</div>
              </div>
              <div class="row">
                  <div class="cell"></div>
              </div>
          </div>
        </div>
    </body>
</html>
